GIMP makes use of "Y' u8" to "R'G'B' u8" and we had no paths covering it,
making it go through floating point. This commit adds code paths for expanding
single grayscale u8 to R'G'B and R'G'B'A as well as R'aG'aB'aA u8.
}
}
+static void
+conv_g8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
+{
+ long n = samples;
+
+ while (n--)
+ {
+ dst[0]=*src;
+ dst[1]=*src;
+ dst[2]=*src;
+ dst += 3;
+ src += 1;
+ }
+}
+#define conv_g8_rgbA8 conv_g8_rgba8
+static void
+conv_g8_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
+{
+ long n = samples;
+
+ while (n--)
+ {
+ dst[0]=*src;
+ dst[1]=*src;
+ dst[2]=*src;
+ dst[3]=255;
+ dst += 4;
+ src += 1;
+ }
+}
+
static void
conv_gaF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
o (ga8, gaF);
o (gA8, gAF);
o (g8, gF);
+ o (g8, rgb8);
+ o (g8, rgba8);
+ o (g8, rgbA8);
o (gaF, ga16);
o (gAF, gA16);
o (gF, g16);